package org.xue.snowmall.order.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.xue.snowmall.order.interceptor.LoginInterceptor;

/**
 * @author 小刘的小张
 * @version 1.0
 * @description: TODO
 * @date 2021/9/23 16:52
 */
@Configuration
public class WebMvcConfiguration implements WebMvcConfigurer {
    @Autowired
    public LoginInterceptor loginInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(loginInterceptor).addPathPatterns("/**");
    }
}
